﻿
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- saved from url=(0014)about:internet -->
<html>
    <head>
        <meta content="Innovasys Document! X (http://www.innovasys.com)" name=GENERATOR>
        <!--DXMETADATA start type="MetaCharset" --><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"><!--DXMETADATA end-->
        <!--DXMETADATA start type="PageItemTitle" format="<title>Overview</title>" --><title>TrackControl Control</title><!--DXMETADATA end-->
        <link href="stylesheets/axstylesheet.css" type=text/css rel=stylesheet>
        <script src="script/ax.js" type=text/javascript>
    </script>

    


<style>
html,div { margin: 0; padding: 0;}

body {
	padding: 0px;
	margin: 0px;
	overflow: auto;
	height: 100%;
}

#winchm_template_button{
	float: right;
	width: 93px;
	top: 7px;
	position: relative;
	text-align: right;
	right: 5px;
	height: auto;
}

#winchm_template_top{
	padding: 0px;
	margin: 0px;
	border-bottom: 1px solid #9B9B9B;
	background-color: #B1CEFE;
}

#winchm_template_navigation{
	margin: 0px;
	padding-top: 7px;
	padding-left: 7px;
	padding-bottom: 3px;
	padding-right: 0px;
	font-size: 8.5pt;
	font-family: Arial, Helvetica, sans-serif;
	font-weight: normal;
	color: #585858;
}

#winchm_template_title{
	margin: 0px;
	padding-top: 4px;
	padding-left: 7px;
	padding-bottom: 7px;
	padding-right: 0px;
	font-size: 18px; 
	font-family: Verdana, Geneva, sans-serif;
	color: #363636;
}

#winchm_template_content{
	margin-top: 20px;
	margin-left: 15px;
	margin-bottom: 20px;
	margin-right: 15px;
	width: auto  !important;
	width: 100%;
}

#winchm_template_footer{
	border-width: 1px;
	border-color: #B1CEFE;
	border-top-style: solid;
	margin-top: 15px;
	margin-left: 15px;
	margin-bottom: 20px;
	margin-right: 15px;
	padding-top: 7px;
	padding-left: 0px;
	padding-bottom: 0px;
	padding-right: 0px;
	font-family: arial, helvetica, sans-serif;
	font-size: 8.5pt;
	color: #696969;
	width: auto;
	text-align: left;
}


#winchm_template_container{
	margin: 0px;
	padding: 0px;
	position: static;
	padding-bottom: 3px;
	overflow: auto;
	background-color: #FFFFFF;
}


@media print
{
#winchm_template_container{
	position: static;	
	margin: 0px;
	padding: 5px;
	
	width: auto;
	height: auto;
	overflow: auto;
}
#winchm_template_button{
visibility:hidden;
}
}

#winchm_template_navigation A:link	{text-decoration: none; color:#004080}
#winchm_template_navigation A:visited  {text-decoration: none; color: #004080}
#winchm_template_navigation A:active {text-decoration: none; color: #004080 }
#winchm_template_navigation A:hover {text-decoration: none;color: #0080FF}

A:link	{text-decoration: underline; color:#0033CC}
A:visited  {text-decoration: underline; color: #0033CC}
A:active {text-decoration: underline; color: #0033CC }
A:hover {text-decoration: underline;color: #FF0000;}
</style>
<script type="text/javascript">
function isMobile(){
Agent = window.navigator.userAgent;
if (Agent.indexOf("iPhone")>=1 || Agent.indexOf("iPad")>=1 || Agent.indexOf("iPod")>=1 || Agent.indexOf("Android")>=1){
return true;
}else{
return false;	
}

}
function d_onresize(){
if (window.navigator.userAgent.indexOf("MSIE")>=1){
document.getElementById('winchm_template_container').style.pixelWidth = document.body.offsetWidth - 3;
document.getElementById('winchm_template_container').style.pixelHeight = document.body.offsetHeight - document.getElementById('winchm_template_top').offsetHeight - 4;
}
document.getElementById('winchm_template_container').style.top = document.getElementById('winchm_template_top').offsetHeight + 'px';
}

function d_onbeforeprint(){
document.getElementById('winchm_template_container').style.width = 'auto';
document.getElementById('winchm_template_container').style.height = 'auto';
}

function d_onafterprint(){
d_onresize();
}

if(!isMobile()){

window.onload = d_onresize;
window.onresize = d_onresize;
window.onbeforeprint = d_onbeforeprint;
window.onafterprint = d_onafterprint;

document.write("<style>\n");
document.write("body {overflow: hidden;}\n");
document.write("#winchm_template_container {position: absolute;overflow: auto;top : 0px;right: 0px;bottom: 0px;left: 0px;}\n");
document.write("</style>\n");
}

</script>
</head>
    <body><script language="JavaScript" type="text/JavaScript">
function syn(){
if(parent.nav.tree){
 if(parent.nav.tree.loaded){
  parent.nav.tree.selectNode(14242);
 }else{
  setTimeout("syn()",500);
}
  }else{
  setTimeout("syn()",500);
  }}
if(parent!=self){
  setTimeout("syn()",100);
}else{
  parent.location.href = "../index.htm?page=XtremeReportControl~TrackControl.html";
}
originalOnload = window.onload;
if(originalOnload==null){
window.onload = function(){parent.contentLoaded = true;};
}else{
window.onload = function(){originalOnload();parent.contentLoaded = true;};
}
</script> 


<div id="winchm_template_top">
	<div id="winchm_template_button"><A href="XtremeReportControl~TrackControl.html" title="Previous topic"><img id="winchm_template_prev" alt="Previous topic" src="template2/btn_prev_n.gif" border="0"></a><A href="XtremeReportControl~TrackControl_members.html" title="Next topic"><img id="winchm_template_next" alt="Next topic" src="template2/btn_next_n.gif" border="0"></a></div>
	<div id="winchm_template_navigation">Help &gt; 
<A href="welcome_screen.htm">Codejock ActiveX Controls v15.3</A> &gt; <A href="XtremeReportControl_P.html">Xtreme Report Control</A> &gt; Objects &gt; <A href="XtremeReportControl~TrackControl.html">TrackControl Control</A> &gt; </div>
	<div id="winchm_template_title">Overview</div>
</div>
<div id="winchm_template_container">
	<div id="winchm_template_content"><div class=popupbubble id=dxseealsomenu><p id=dxseealsocontent><a href="#Bookmark14243">TrackControl Members</a>
</p><!--DXMETADATA end --> 
        </div>
        <div id=pagetop>
            <div id=projectnamebanner>
                <table class=projectnametable cellspacing=0>
                    <tbody>
                        <tr>
                            <!--DXMETADATA start type="Literal" condition="childitems:itemtype=seealso" value="<td class='button'><a href='' id='seealsobutton' onclick='showSeeAlsoBox()'><img alt='See Also' border='0' src='axImages/seealso.gif' width=14 height=14></a></td>" --><td class='button'><a href='' id='seealsobutton' onclick='showSeeAlsoBox()'><img alt='See Also' border='0' src='axImages/seealso.gif' width=14 height=14></a></td><!--DXMETADATA end -->
                            <td>
                                <!--DXMETADATA start type="Phrase" Name="Product_Header" -->Xtreme Report Control ActiveX Control v15.3<!--DXMETADATA end --> 
                            </td>
                            <td align=right>
                                <!--DXMETADATA start type="Variable" name="FeedbackLink" format="" --><!--DXMETADATA end -->
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <div id=pagetitlebanner>
                <h1 class=dxh1>
                <!--DXMETADATA start type="PageItemTitle" -->TrackControl Control<!--DXMETADATA end --></h1>
            </div>
        </div>
        <div id=pagebody valign="bottom">
            <!--DXMETADATA start type="IsNew" format="<script>document.all.pagebody.className = 'newTopic'</script>" --><!--DXMETADATA end --> 
            <!--DXMETADATA start type="Description" source="Item" format="<h4 class=dxh4>$$Description$$</h4><p>%%description%%</p>" --><h4 class=dxh4>Description</h4><p>Track Control</p><!--DXMETADATA end --> 
            <!--DXMETADATA start type="Scrap" name="_MEMBERS_LINK" format="<p>%%scrap%%</p>" --><p>For a list of all members defined in this module, see <a href="#Bookmark14243">TrackControl members</a>.</p><!--DXMETADATA end --> 
            <!--DXMETADATA start type="Diagram" source="item" format="<h4 class=dxh4>$$OBJECT_MODEL$$</h4><p>%%Diagram%%</p>" --><h4 class=dxh4>Object Model</h4><p><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0><TR><TD NOWRAP>
<a href="#Bookmark14241"><img src="cDiagramImages/XtremeReportControl~TrackControl~293.gif" border=0></a><br><img src="cDiagramImages/parmult.gif" border=0><a href="#Bookmark13339"><img src="cDiagramImages/XtremeReportControl~FieldChooser~293.gif" border=0></a><br><img src="cDiagramImages/parmult.gif" border=0><a href="#Bookmark13367"><img src="cDiagramImages/XtremeReportControl~Icons_(ImageManagerIcons)~293.gif" border=0></a><img src="cDiagramImages/paracros.gif" border=0><a href="#Bookmark13353"><img src="cDiagramImages/XtremeReportControl~GetImage_(ImageManagerIcon)~293.gif" border=0></a><br><img src="cDiagramImages/parmult.gif" border=0><a href="#Bookmark14129"><img src="cDiagramImages/XtremeReportControl~FocusedRow_(ReportRow)~293.gif" border=0></a><br><img src="cDiagramImages/parmult.gif" border=0><a href="#Bookmark13447"><img src="cDiagramImages/XtremeReportControl~FocusedColumn_(ReportColumn)~293.gif" border=0></a><br><img src="cDiagramImages/parmult.gif" border=0><a href="#Bookmark20160"><img src="cDiagramImages/XtremeReportControl~DataManager_(ReportDataManager)~293.gif" border=0></a><br><img src="cDiagramImages/parlower.gif" border=0><img src="cDiagramImages/parchild.gif" border=0><a href="#Bookmark14014"><img src="cDiagramImages/XtremeReportControl~CreateEmptyRecord_(ReportRecord)~293.gif" border=0></a><img src="cDiagramImages/paracros.gif" border=0><a href="#Bookmark14034"><img src="cDiagramImages/XtremeReportControl~ReportRecordItem~293.gif" border=0></a><br><img src="cDiagramImages/parmult.gif" border=0><a href="#Bookmark13505"><img src="cDiagramImages/XtremeReportControl~Columns_(ReportColumns)~293.gif" border=0></a><img src="cDiagramImages/paracros.gif" border=0><a href="#Bookmark13447"><img src="cDiagramImages/XtremeReportControl~ReportColumn~293.gif" border=0></a><br><img src="cDiagramImages/parmult.gif" border=0><a href="#Bookmark14113"><img src="cDiagramImages/XtremeReportControl~Records_(ReportRecords)~293.gif" border=0></a><br><img src="cDiagramImages/parlower.gif" border=0><img src="cDiagramImages/parchild.gif" border=0><a href="#Bookmark14014"><img src="cDiagramImages/XtremeReportControl~ReportRecord~293.gif" border=0></a><img src="cDiagramImages/paracros.gif" border=0><a href="#Bookmark14034"><img src="cDiagramImages/XtremeReportControl~ReportRecordItem~293.gif" border=0></a><br><img src="cDiagramImages/parmult.gif" border=0><a href="#Bookmark14500"><img src="cDiagramImages/XtremeReportControl~PaintManager_(TrackPaintManager)~293.gif" border=0></a><br><img src="cDiagramImages/parmult.gif" border=0><a href="#Bookmark14147"><img src="cDiagramImages/XtremeReportControl~Rows_(ReportRows)~293.gif" border=0></a><img src="cDiagramImages/paracros.gif" border=0><a href="#Bookmark14129"><img src="cDiagramImages/XtremeReportControl~ReportRow~293.gif" border=0></a><br><img src="cDiagramImages/parmult.gif" border=0><a href="#Bookmark14173"><img src="cDiagramImages/XtremeReportControl~SelectedRows_(ReportSelectedRows)~293.gif" border=0></a><img src="cDiagramImages/paracros.gif" border=0><a href="#Bookmark14129"><img src="cDiagramImages/XtremeReportControl~ReportRow~293.gif" border=0></a><br><img src="cDiagramImages/parmult.gif" border=0><a href="#Bookmark13494"><img src="cDiagramImages/XtremeReportControl~SortOrder_(ReportColumnOrder)~293.gif" border=0></a><img src="cDiagramImages/paracros.gif" border=0><a href="#Bookmark13447"><img src="cDiagramImages/XtremeReportControl~ReportColumn~293.gif" border=0></a><br><img src="cDiagramImages/parmult.gif" border=0><a href="#Bookmark13494"><img src="cDiagramImages/XtremeReportControl~GroupsOrder_(ReportColumnOrder)~293.gif" border=0></a><img src="cDiagramImages/paracros.gif" border=0><a href="#Bookmark13447"><img src="cDiagramImages/XtremeReportControl~ReportColumn~293.gif" border=0></a><br><img src="cDiagramImages/parmult.gif" border=0><a href="#Bookmark13867"><img src="cDiagramImages/XtremeReportControl~Navigator_(ReportNavigator)~293.gif" border=0></a><br><img src="cDiagramImages/parmult.gif" border=0><a href="#Bookmark13771"><img src="cDiagramImages/XtremeReportControl~HitTest_(ReportHitTestInfo)~293.gif" border=0></a><br><img src="cDiagramImages/parmult.gif" border=0><a href="#Bookmark14205"><img src="cDiagramImages/XtremeReportControl~ToolTipContext~293.gif" border=0></a><br><img src="cDiagramImages/parmult.gif" border=0><a href="#Bookmark13997"><img src="cDiagramImages/XtremeReportControl~PrintOptions_(ReportPrintOptions)~293.gif" border=0></a><br><img src="cDiagramImages/parmult.gif" border=0><a href="#Bookmark14014"><img src="cDiagramImages/XtremeReportControl~AddRecord_(ReportRecord)~293.gif" border=0></a><img src="cDiagramImages/paracros.gif" border=0><a href="#Bookmark14034"><img src="cDiagramImages/XtremeReportControl~ReportRecordItem~293.gif" border=0></a><br><img src="cDiagramImages/parmult.gif" border=0><a href="#Bookmark14014"><img src="cDiagramImages/XtremeReportControl~InsertRecord_(ReportRecord)~293.gif" border=0></a><img src="cDiagramImages/paracros.gif" border=0><a href="#Bookmark14034"><img src="cDiagramImages/XtremeReportControl~ReportRecordItem~293.gif" border=0></a><br><img src="cDiagramImages/parmult.gif" border=0><a href="#Bookmark14640"><img src="cDiagramImages/XtremeReportControl~PrintPreviewOptions_(XtremePrintPreviewOptions)~293.gif" border=0></a><br><img src="cDiagramImages/parmult.gif" border=0><a href="#Bookmark14113"><img src="cDiagramImages/XtremeReportControl~CreateRecordsFromDropArray_(ReportRecords)~293.gif" border=0></a><br><img src="cDiagramImages/parlower.gif" border=0><img src="cDiagramImages/parchild.gif" border=0><a href="#Bookmark14014"><img src="cDiagramImages/XtremeReportControl~ReportRecord~293.gif" border=0></a><img src="cDiagramImages/paracros.gif" border=0><a href="#Bookmark14034"><img src="cDiagramImages/XtremeReportControl~ReportRecordItem~293.gif" border=0></a><br><img src="cDiagramImages/parmult.gif" border=0><a href="#Bookmark14113"><img src="cDiagramImages/XtremeReportControl~CreateRecords_(ReportRecords)~293.gif" border=0></a><br><img src="cDiagramImages/parlower.gif" border=0><img src="cDiagramImages/parchild.gif" border=0><a href="#Bookmark14014"><img src="cDiagramImages/XtremeReportControl~ReportRecord~293.gif" border=0></a><img src="cDiagramImages/paracros.gif" border=0><a href="#Bookmark14034"><img src="cDiagramImages/XtremeReportControl~ReportRecordItem~293.gif" border=0></a><br><img src="cDiagramImages/parmult.gif" border=0><a href="#Bookmark14113"><img src="cDiagramImages/XtremeReportControl~HeaderRecords_(ReportRecords)~293.gif" border=0></a><br><img src="cDiagramImages/parlower.gif" border=0><img src="cDiagramImages/parchild.gif" border=0><a href="#Bookmark14014"><img src="cDiagramImages/XtremeReportControl~ReportRecord~293.gif" border=0></a><img src="cDiagramImages/paracros.gif" border=0><a href="#Bookmark14034"><img src="cDiagramImages/XtremeReportControl~ReportRecordItem~293.gif" border=0></a><br><img src="cDiagramImages/parmult.gif" border=0><a href="#Bookmark14113"><img src="cDiagramImages/XtremeReportControl~FooterRecords_(ReportRecords)~293.gif" border=0></a><br><img src="cDiagramImages/parlower.gif" border=0><img src="cDiagramImages/parchild.gif" border=0><a href="#Bookmark14014"><img src="cDiagramImages/XtremeReportControl~ReportRecord~293.gif" border=0></a><img src="cDiagramImages/paracros.gif" border=0><a href="#Bookmark14034"><img src="cDiagramImages/XtremeReportControl~ReportRecordItem~293.gif" border=0></a><br><img src="cDiagramImages/parmult.gif" border=0><a href="#Bookmark14147"><img src="cDiagramImages/XtremeReportControl~HeaderRows_(ReportRows)~293.gif" border=0></a><img src="cDiagramImages/paracros.gif" border=0><a href="#Bookmark14129"><img src="cDiagramImages/XtremeReportControl~ReportRow~293.gif" border=0></a><br><img src="cDiagramImages/parmult.gif" border=0><a href="#Bookmark14147"><img src="cDiagramImages/XtremeReportControl~FooterRows_(ReportRows)~293.gif" border=0></a><img src="cDiagramImages/paracros.gif" border=0><a href="#Bookmark14129"><img src="cDiagramImages/XtremeReportControl~ReportRow~293.gif" border=0></a><br><img src="cDiagramImages/parmult.gif" border=0><a href="#Bookmark13395"><img src="cDiagramImages/XtremeReportControl~MarkupContext~293.gif" border=0></a><br><img src="cDiagramImages/parmult.gif" border=0><a href="#Bookmark14470"><img src="cDiagramImages/XtremeReportControl~CreateTrackItem_(TrackControlItem)~293.gif" border=0></a><br><img src="cDiagramImages/parmult.gif" border=0><a href="#Bookmark14490"><img src="cDiagramImages/XtremeReportControl~Markers_(TrackMarkers)~293.gif" border=0></a><img src="cDiagramImages/paracros.gif" border=0><a href="#Bookmark14484"><img src="cDiagramImages/XtremeReportControl~TrackMarker~293.gif" border=0></a><br><img src="cDiagramImages/parmult.gif" border=0><a href="#Bookmark14621"><img src="cDiagramImages/XtremeReportControl~UndoManager_(TrackUndoManager)~293.gif" border=0></a><br><img src="cDiagramImages/parchild.gif" border=0><a href="#Bookmark14197"><img src="cDiagramImages/XtremeReportControl~SelectedBlocks_(SelectedTrackBlocks)~293.gif" border=0></a><img src="cDiagramImages/paracros.gif" border=0><a href="#Bookmark14221"><img src="cDiagramImages/XtremeReportControl~TrackBlock~293.gif" border=0></a>
</TD></TABLE>
</p><!--DXMETADATA end --> 
            <!--DXMETADATA start type="TaggedComment" source="Item" id="##MODULE_REMARKS" format="<h4 class=dxh4>$$Remarks$$</h4><p>%%comment%%</p>" --><h4 class=dxh4>Remarks</h4><p><P>The Track Control is an extension to the Report Control.&nbsp; It can do basically everything the the Report Control can do with the addition of a Track Control.</P>
<P>&nbsp;</P>
<P><STRONG>What can it be used for?</STRONG></P>
<P>The use for this new control can be thought of like this:&nbsp; just imagine it as an&nbsp;editor for video, each block is a small clip or video effect or some music track, by&nbsp;moving the blocks you are arranging the&nbsp;order of them.&nbsp; </P>
<P>&nbsp;</P>
<P>Or&nbsp;for those into game development, it can be thought of as&nbsp;holding the screen scenes of a video game.</P>
<P>&nbsp;</P>
<P>Of course it can be used for any purpose, but those are 2 scenarios where developers in the movie, music or game field could benefit.<BR></P>
<P><STRONG>What components make up the tack control?</STRONG></P>
<P>Below is an image that shows the various components that make up the track control.</P>
<P><IMG border=0 src="Pictures/trackcontrol.png"></P>
<P>&nbsp;</P>
<P><STRONG>What Objects, Methods and Properties are used to create tracks in the track control?</STRONG></P>
<P>The following code is used to work with the components in the track control.&nbsp; All help will be in reference to units of time, but you can think of time units as whatever you wish.</P>
<P>&nbsp;</P>
<P>***Note all the code snippets are taken from the COMPLETE sample at the bottom of the topic so that you can see how to initialize the variables, etc...***</P>
<P>&nbsp;</P>
<P>Setting the Time Line Bounds, this will set the total length of the time line:</P>
<P>&nbsp;&nbsp;&nbsp; TrackControl.TimeLineMax = 200<BR>&nbsp;&nbsp;&nbsp; TrackControl.TimeLineMin = 0</P>
<P>This code sets the time line with a range of 0 to 200 units of time</P>
<P>&nbsp;</P>
<P>Specifying the&nbsp;portion (zoom\scale)&nbsp;of the time line that will be in view, which we call the View Port:</P>
<P>&nbsp;&nbsp;&nbsp; TrackControl.ViewPortMax = 100<BR>&nbsp;&nbsp;&nbsp; TrackControl.ViewPortMin = 0</P>
<P>This code sets the View Port to show only 100&nbsp;units of time out of the 200 units of time set above.</P>
<P>&nbsp;</P>
<P>Specifies the current work area within the time line.&nbsp; This area has it's own scroll bar at the top of the tracks that allows it to be moved as the user desires.&nbsp; The work area is displayed in the shaded area under the work area scroll bar.</P>
<P>&nbsp;&nbsp;&nbsp; TrackControl.WorkAreaMax = 75<BR>&nbsp;&nbsp;&nbsp; TrackControl.WorkAreaMin = 25</P>
<P>This code specifies an work area of 50 units of time.&nbsp; The initial position of the work area will be from 25 units of time to 75 units of time.&nbsp; The user can move this using the scroll bar, as well as adjust the units of time it represents.</P>
<P>&nbsp;</P>
<P>The current position of time in the time line is indicated with the Time Line Position.</P>
<P>&nbsp;&nbsp;&nbsp; TrackControl.TimeLinePosition = 50</P>
<P>The time line position tracker simply shows the current position in time, for example, it can be used to show the current time in a movie playing as it progresses through the track.</P>
<P>&nbsp;</P>
<P>The Track Control uses a special item type call a <A href="#Bookmark14470">TrackControlItem</A>.&nbsp; This item is used to hold blocks and keys.&nbsp;&nbsp;<A href="#Bookmark14259">CreateTrackItem</A> will create a new <A href="#Bookmark14470">TrackControlItem</A>&nbsp;that can be added to a <STRONG>ReportRecord</STRONG> using the <A href="#Bookmark14019">AddItemEx</A>&nbsp;method.&nbsp; Once the <A href="#Bookmark14470">TrackControlItem</A>&nbsp;is added to the&nbsp;<STRONG>ReportRecord</STRONG>&nbsp;it will be displayed in the Track Control.&nbsp;</P>
<P>&nbsp;</P>
<P>Tracks are what hold the blocks and keys.&nbsp; A track is a special item that is added to a regular <STRONG>ReportRecord</STRONG>.&nbsp; </P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim TrackItem As TrackControlItem<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim Record As ReportRecord<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim Block As TrackBlock<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set Record = TrackControl.Records.Add<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Record.AddItem 1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Record.AddItem 1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Record.AddItem 1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set TrackItem = TrackControl.<STRONG>CreateTrackItem</STRONG><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Record.<STRONG>AddItemEx</STRONG> TrackItem<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set Block = TrackItem.AddBlock(False, 15, 25)</P>
<P>The code above adds a track to the track control.&nbsp; It adds 3 normal columns, then it adds a track item.&nbsp; You must first create a track item before you can use it using the <STRONG>CreateTrackItem </STRONG>method.&nbsp; Once it is created you can then add this new track item to the record using <STRONG>AddItemEx</STRONG>.&nbsp; This will add your track so you can then add blocks and keys.</P>
<P>&nbsp;</P>
<P>Markers are used for block alignment, blocks can be "snapped" to the left or right of these markers.</P>
<P>&nbsp;&nbsp;&nbsp; Dim Marker As TrackMarker<BR>&nbsp;&nbsp;&nbsp; Set Marker = TrackControl.Markers.Add(20, "0")<BR>&nbsp;&nbsp;&nbsp; Marker.Caption = "1"<BR>&nbsp;&nbsp;&nbsp; TrackControl.Markers.Add 70, "2"<BR>&nbsp;&nbsp;&nbsp; TrackControl.Markers.Add 90, "3"</P>
<P>The code above adds 3 markers to the track control.&nbsp; These markers are placed in the time line at the specified time unit, in this case, at 20, 70 and 90 units of time.</P>
<P>&nbsp;</P>
<P>Keys are used simply as "notes" or reference points in the track.&nbsp; They can be added anywhere in the track to make note of some event at the given moment in time.</P>
<P>&nbsp;&nbsp;&nbsp; TrackItem.AddBlock(<STRONG>True</STRONG>, 70, 0)</P>
<P>The code above will add a key at time unit 70, the last parameter, size, is ignored when adding keys.&nbsp; Note the first parameter is <STRONG>True</STRONG>, which tells <STRONG>AddBlock</STRONG> to add a key as opposed to a block.</P>
<P>&nbsp;</P>
<P>Blocks are a visual representation of units of time in a track.&nbsp; They can have both a minimum and maximum time period.&nbsp; For example, a given block can represent 25 units of time, but can no less than 15 and no more than 30 units of time.</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim TrackItem As TrackControlItem<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim Block As TrackBlock<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set TrackItem = TrackControl.CreateTrackItem<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Record.AddItemEx TrackItem<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set Block = TrackItem.AddBlock(<STRONG>False</STRONG>, 15, 25)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Block.MinLength = 15<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Block.MaxLength = 30<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Block.Color = RGB(255, 219, 117)</P>
<P>The code above adds a block that represents 25 time units.&nbsp; It is placed within the track at 15 time units.&nbsp; Also note the the first parameter of <STRONG>AddBlock</STRONG> is <STRONG>False</STRONG>, which indicates we are adding a <STRONG>block</STRONG> as opposed to a <STRONG>key</STRONG>.</P>
<P>&nbsp;</P>
<P>If <A href="#Bookmark14302">AllowBlockScale</A>&nbsp;is <STRONG>False</STRONG>, the block will not be able to be resized by the user and <A href="#Bookmark14236">MinLength</A>&nbsp;and <A href="#Bookmark14235">MaxLength</A> will be ignored.</P>
<P>&nbsp;</P>
<P>When <A href="#Bookmark14301">AllowBlockRemove</A>&nbsp;is <STRONG>True</STRONG>, blocks can be dragged from one track to a different track.&nbsp;&nbsp;When <STRONG>False</STRONG>, blocks can only be moved within the same track.</P>
<P>&nbsp;</P>
<P><A href="#Bookmark14300">AllowBlockMove</A>&nbsp;specifies whether the user can&nbsp;move blocks and keys.&nbsp; When False, keys and blocks can't be moved, but they can be resized\scaled.&nbsp; Use <A href="#Bookmark14302">AllowBlockScale</A>&nbsp;to restrict block resizing.</P>
<P>&nbsp;</P>
<P>When&nbsp;<A href="#Bookmark14333">FlexibleDrag</A> is <STRONG>True</STRONG>, the track control will re-position blocks to allow room for a block to be dragged to the specified location.&nbsp; When False a block can only be dragged to a location if there is enough room to fit the block without moving the others that are already there.</P>
<P>&nbsp;</P>
<P>Blocks can also be different different heights and set to different vertical&nbsp;alignments within the track.&nbsp; This is used just as a visual aid to make different blocks in the track visually different from each other.</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Block.HeightPercent = 0.5</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Block.VerticalAlignment = xtpTrackBlockCenter</P>
<P>The code above simply makes the block 50% the size of the track height and vertically aligns the block in the center of the track.</P>
<P>&nbsp;</P>
<P>A block or key uses the <A href="#Bookmark14238">Selected</A>&nbsp;property to show when it is selected.</P>
<P>&nbsp;</P></p><!--DXMETADATA end --> 
            <!--DXMETADATA start type="FilteredItemList" scrap="ITEM_LIST_WITH_HEADER" namespace="implemented interface" source="Item" filter="" format="<h4 class=dxh4>$$Interfaces$$</h4>%%filtereditemlist%%" --><!--DXMETADATA end --> 
            <!--DXMETADATA start type="TaggedComment" source="Item" id="##MODULE_EXAMPLEINTRO" format="<h4 class=dxh4>$$Example$$</h4><p>%%comment%%</p>" --><!--DXMETADATA end --> 
            <!--DXMETADATA start type="FilteredItemList" scrap="INLINE_EXAMPLE" namespace="Example" source="Item" filter="type=inline" NoHeader="True" NoFooter="True" format="<h4 class=dxh4>$$Example$$</h4>,format= %%%%filtereditemlist%%" --><h4 class=dxh4>Example</h4><DIV Class=LanguageSpecific Name=Example_VB><p><SPAN class="lang">[Track Control Sample (Visual Basic)]</SPAN>&nbsp;This sample shows how to create a simple track control.</p><DIV Class=LanguageSpecific Name=Code_VB><TABLE Class="CodeContainerTable" CellPadding="0" CellSpacing="0" Border="0"><TR><TD NOWRAP><CODE Class="VB"><font class='keyword'>Private</font> <font class='keyword'>Sub</font> Form_Load()<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Dim</font> Column <font class='keyword'>As</font> ReportColumn<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> Column = TrackControl.Columns.Add(0, <font class='string'>&quot;Column 0&quot;</font>, 100, <font class='keyword'>True</font>)<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> Column = TrackControl.Columns.Add(1, <font class='string'>&quot;Column 1&quot;</font>, 100, <font class='keyword'>True</font>)<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> Column = TrackControl.Columns.Add(2, <font class='string'>&quot;Column 2&quot;</font>, 100, <font class='keyword'>True</font>)<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> Column = TrackControl.Columns.Add(3, <font class='string'>&quot;&quot;</font>, 500, <font class='keyword'>True</font>)<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;Column.AllowDrag = <font class='keyword'>False</font><BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Dim</font> TrackItem <font class='keyword'>As</font> TrackControlItem<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Dim</font> Record <font class='keyword'>As</font> ReportRecord<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Dim</font> Block <font class='keyword'>As</font> TrackBlock<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Dim</font> Key <font class='keyword'>As</font> TrackBlock<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Dim</font> i <font class='keyword'>As</font> <font class='keyword'>Integer</font><BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Dim</font> ColorTable<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;ColorTable = <font class='keyword'>Array</font>(RGB(138, 168, 228), _<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RGB(255, 219, 117), _<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RGB(189, 205, 159), _<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RGB(240, 158, 159), _<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RGB(186, 166, 225), _<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RGB(154, 191, 180), _<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RGB(247, 182, 131), _<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RGB(216, 171, 192))<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>For</font> i = 1 <font class='keyword'>To</font> 20<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> Record = TrackControl.Records.Add<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Record.AddItem i<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Record.AddItem i<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Record.AddItem i<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> TrackItem = TrackControl.CreateTrackItem<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Record.AddItemEx TrackItem<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> Block = TrackItem.AddBlock(<font class='keyword'>False</font>, 70 * Rnd(), 10 + Rnd() * 30)<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Block.Color = ColorTable(Rnd() * 7)<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>If</font> (i <font class='keyword'>Mod</font> 3) = 0 <font class='keyword'>Then</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Dim</font> iK <font class='keyword'>As</font> <font class='keyword'>Integer</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>For</font> iK = 0 <font class='keyword'>To</font> 3<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> Key = TrackItem.AddBlock(<font class='keyword'>True</font>, 70 * Rnd(), 0)<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Key.Color = ColorTable(Rnd() * 7)<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Key.Tooltip = <font class='string'>&quot;Key # &quot;</font> & iK<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>If</font> iK = 0 <font class='keyword'>Then</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Key.VerticalAlignment = 0<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>ElseIf</font> iK = 1 <font class='keyword'>Then</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Key.VerticalAlignment = 4<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Else</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Key.VerticalAlignment = 8<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>End</font> <font class='keyword'>If</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Next</font> iK<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>End</font> <font class='keyword'>If</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Next</font> i<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Dim</font> Marker <font class='keyword'>As</font> TrackMarker<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> Marker = TrackControl.Markers.Add(20, <font class='string'>&quot;0&quot;</font>)<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;Marker.Caption = <font class='string'>&quot;Caption 1&quot;</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;TrackControl.Markers.Add 70, <font class='string'>&quot;2&quot;</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;TrackControl.Markers.Add 90, <font class='string'>&quot;3&quot;</font><BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;TrackControl.TimeLineMax = 200<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;TrackControl.TimeLinePosition = 30<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;TrackControl.ViewPortMax = 100<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;TrackControl.FlexibleDrag = <font class='keyword'>True</font><BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;TrackControl.PaintManager.VerticalGridStyle = xtpGridSolid<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;TrackControl.SnapToBlocks = <font class='keyword'>True</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;TrackControl.FreeHeightMode = <font class='keyword'>True</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;TrackControl.AutoColumnSizing = <font class='keyword'>True</font><BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;TrackControl.MaxColumnWidth = 300<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;TrackControl.Populate<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;wndSlider.Value = (100 - (TrackControl.ViewPortMax - TrackControl.ViewPortMin) * 100 / (TrackControl.TimeLineMax - TrackControl.TimeLineMin))<BR/>
<font class='keyword'>End</font> <font class='keyword'>Sub</font></CODE></TD></TR></TABLE></DIV></DIV>
<!--DXMETADATA end --> 
            <!--DXMETADATA start type="FilteredItemList" scrap="MENU_LINK" namespace="seealso" source="Item" filter="" NoHeader="True" NoFooter="True" format="<h4 class=dxh4>$$See_Also$$</h4><p id=dxseealsocontent>%%filtereditemlist%%</p>" --><h4 class=dxh4>See Also</h4><p id=dxseealsocontent><a href="#Bookmark14243">TrackControl Members</a>
</p><!--DXMETADATA end --><!--DXMETADATA start type="FilteredItemList" scrap="MENU_LINK" namespace="example" source="Item" filter="type=linked" NoHeader="True" NoFooter="True" format="><!--DXMETADATA end --><!--DXMETADATA start type="Variable" name="CopyrightNotice" format="><!--DXMETADATA end --></div></div>	
	<div id="winchm_template_footer">Copyright &copy; 2018. All rights 
reserved. (To change the copyright info, just edit it in template.)</div>
</div>

</body>
</html>

